module AccountHelper
  def options_player_select (selected = 0)
    options_records_select Player.find(:all), selected
  end
  
  def show_player (player)
    if player
      player.login
    else
      "NPC"
    end
  end
  
  def is_admin?
    player = current_player
    if player && player.instance_of? (Player)
      return player.admin?
    end
    return false
  end
  
  def link_to_character_sheet (character = current_player.player_character)
    link_to_record character, "", "Character Sheet"
  end
  
  def link_to_court (court = current_player.player_character.court_territory)
    link_to_record court, "", "My Court"
  end
end